9 MEASURABLE FUNCTIONS 139 A function/: X -> K is a step function if it takes only & finite number of n values ak (1 ^ k g n). In that case we have/= ]£ ak cpAk, where Ak =f~1(ak)9 with the convention that if ak is ± oo, the value of ak(pAk is aA in Ak and 0 in X — Ak (13.11). It follows immediately from this and from (13.9.9) that/is measurable if and only if each of the Ak is measurable. (13.9.12) Le£/:X-»R be measurable. Then there exists a sequence (gn) of universally measurable step functions with compact support, such that \gn(x)\ <£ \f(x)\ for all x e X and such that the sequence (gn(x)} converges al- most everywhere to f(x) (which implies that f is equivalent to a universally measurable function). Consider a partition of X consisting of a sequence (Kn) of compact sets and a negligible set N. For each integer i £ n, there exists a finite covering (Uij\£j£qtn of K£ by sets which are open in Ki9 such that the oscillation of /in each U$ is g l/n (with respect to a distance on K, cf. (3.16.5)). Now we have the following lemma: (13.9.12.1) Let (Fh\^h^p be a finite family of integrable sets. Then there exists a finite family (Gk)igkgr of pairwise disjoint integrable sets, such that each Fh is the union of some of the Gk. p Consider the 2P - 1 sets of the form (°| Zh, where each Zh is either F,, or X — Fh, and Zh = F,, for at least one index h. Then the family of distinct non- empty sets of this form satisfies the conditions of the lemma, because these sets p are integrable by (13.7.6) and each F/, is the union of the sets p) Zz for which By applying this lemma to each of the finite families (^Jij\^j^qin9 we obtain a. partition (A^X^^,.^ of Kf into universally measurable, integrable sets. Let 0 if /changes sign in A^, if/XAJJ?) if /^O on A^, [sup/(Ag>) if /^O on Ag>, and define gn as follows: gn(x) = a$ if x e A$ (1 ^ i 5* n, 1 <£ k ^ rin), and #«(*) == 0 otherwise. Then it is clear that the functions gn have the required properties.ions obtained from semi-continuous